<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="_{$adminbase}styles/documentation.css" type="text/css" rel="stylesheet"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="MSThemeCompatible" content="no" />
<title>修改航班</title>
<link href="_{$adminbase}styles/common.css" rel="stylesheet" type="text/css" />
	<link href="_{$adminbase}scripts/ckeditor/sample.css" rel="stylesheet" type="text/css"/>


<body>
<div id="main">
<div class="xs_tl"> 
<div class="l"></div>
<div class="r"></div>
<div class="hackbox"></div>
</div>
<div>
</div>
_{if $errmsg!=''}
<div class="info">
_{$errmsg}
</div>
_{/if}
<div class="boxer">
<div id="OP_ListMaster">
<div class="header_1">修改航班计划</div>
<div class="line_1"></div>
<form action="admin.php?action=cruise-edit" method="post">

	<p>选择邮轮:
					<label>
									<select name="flight" id="flight">
									_{section name=flight loop=$flight_list}
									<option value="_{$flight_list[flight].fid}" _{if  $cruise_details.fid==$flight_list[flight].fid} selected="selected" _{/if}>_{$flight_list[flight].fname}</option>
									_{/section}
									</select>
					</label>
	</p>
<p>执行路线:
					<label>
									<select name="city_id">
									_{section name=city loop=$city_list}
													<option value="_{$city_list[city].city_id}">_{$city_list[city].city}</option>
									_{/section}
									</select>
					</label>
	</p>
	<p>统一周几出发：
					<label>
									<input type="text" name="week" id="week" value="_{$cruise_details.Begin_date}" />
					</label>
	(阿拉伯数字，例：5 就是星期5……)</p>
<p>统一出发时间：
				<label>
								<input type="text" name="time" id="time" value="_{$cruise_details.Begin_time}" />
								(24小时制，例:18:05, 其实这里只要是个时间即可，务必使用英文.但我推荐个位数的话有前导零，比较规范。)
				</label>
</p>
<p>
				<input type="hidden" value="_{$cruise_details.cid}" name="id" />
				<input type="submit" value="提交(Submit)" />
			</p>
		</form>
</div>
</div>
<div class="xs_bl">
<div class="l"></div>
<div class="r"></div>
<div class="hackbox"></div>
</div>
</div>
</body>
</html>
 <!--Check -->
<script type="text/javascript">
	
	function $(id){ return document.getElementById(id);}
	var way = $('way');
	var end = $('end');
	var start = $('start');
	function changea(v){
		if(v=='Chongqing'){
			alert('下行');
			way[1].selected=true;
		}
		if(v=='Yichang'){
			if(end.value=='Wuhan' || end.value=='Shanghai'){
				alert('下行');
				way[1].selected=true;
			}else{
				alert('上行');
				way[0].selected=true;	
			}
		}
		if(v=='Wuhan'){
			if(end.value=='Shanghai'){
			alert('下行');
			way[1].selected=true;	
			}else{
				alert('上行');
			way[0].selected=true;	
			}
		}
		if(v=='Shanghai'){
			if(end.value=='Wuhan' || end.value=='Chongqing' || end.value=='Yichang'){
				alert('上行');
				way[0].selected=true;
			}
		}
		if(v==end.value){
			alert('同样的2个城市我没办法做选择');
		}
	}
	function changeb(v){
		if(v=='Shanghai'){
			if(start.value=='Chongqing' || start.value=='Wuhan' || start.value=='Yichang'){
				alert('下行');
				way[1].selected=true;
			}else{
				alert('上行');
				way[0].selected=true;	
			}
		}
		if(v=='Wuhan'){
			if(start.value=='Shanghai'){
				alert('下行');
				way[1].selected=true;	
			}else{
				alert('上行');
				way[0].selected=true;
			}
		}
		if(v=='Yichang'){
			if(start.value=='Chongqing'){
				alert('下行');
				way[1].selected=true;
			}else{
				alert('上行');
				way[0].selected=true;
			}
		}
		if(v=='Chongqing'){
			alert('上行');
			way[0].selected=true;
		}
		if(v==start.value){
			alert('同样的2个城市我没办法做选择');
		}
	}
		var DBstart = '_{$cruise_details.Begin_city}';
		var DBend = '_{$cruise_details.End_city}';
		var DBway = '_{$cruise_details.Updown}';
		for(i=0;i<start.length;i++){
			if(start[i].value==DBstart){
				start[i].selected=true;
			}
		}
		for(i=0;i<end.length;i++){
			if(end[i].value==DBend){
				end[i].selected=true;
			}
		}
		for(i=0;i<way.length;i++){
			if(way[i].value==DBway){
				way[i].selected=true;
			}
		}
</script>